package main

import (
	"fmt"
)

//数组初始化
//简化数组遍历
func main() {
	//strArr1 := [...]string{1: "zhangsan", 0: "lisi", 2: "zhaoliu"}
	//for i, v := range strArr1 {
	//	fmt.Println(i, v)
	//}
	//fmt.Println(strArr1)

	//值传递改指针传递
	var arr01 = [3]string{"zhangsan", "lisi", "wangwu"}
	fmt.Println(arr01)
	test(&arr01)
	fmt.Println(arr01)
}

func test(arr *[3]string) {
	(*arr)[0] = "qianqi"
}

func test1(arr [3]string) {
	arr[1] = "sejfa"
}
